import request from "@/utils/request";

export const createOrder = (data) => request.post('/api/order/create', data)
export const getOrders = (params) => request.get('/api/order/page', {params})
export const getOrderDetail = (id) => request.get(`/api/order/detail/${id}`)
export const cancelOrder = (id) => request.post(`/api/order/cancel/${id}`)
export const getOrdersByUser = (userId) => request.get(`/api/order/user/${userId}`)
export const getOrdersByStatus = (status) => request.get(`/api/order/status/${status}`)
export const createPayment = (data) => request.post('/api/payment/create', data)
export const queryPayment = (paymentNo) => request.get(`/api/payment/query/${paymentNo}`)